from enum import Enum
from dataclasses import dataclass
from typing import Optional, Dict, Any


class EmailType(Enum):
    PLATFORM = "platform"
    CUSTOMER = "customer"


@dataclass
class EmailQA:
    id: int
    system_conversation_id: str
    q_body: str
    q_subject: str
    q_real_question: str
    q_question_subject: str
    q_attachment_content: str
    customer_service_answer: str
    context_email_conversation_history_summary: str
    context_order_info: str
    email_type: EmailType
    
    def __post_init__(self):
        if isinstance(self.email_type, str):
            self.email_type = EmailType(self.email_type)